STEP 14: When random_choice is 1, then computer picks "rock". Let's store that data in a new variable to use later.

  • Go to and drag out String Variable. Drop it inside the last if statement, below .say().
  • Change the name of the new variable to computer_choice.
  • Change the value of the new variable to "rock".

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)